function gonghuo() {
    var lefTime = $("#lefTime").val();
    var rightTime = $("#rightTime").val();
    var date1 = new Date(lefTime);
    var date2 = new Date(rightTime);
    if (date1!=""&&date2!="") {
        if (date1==""&&date2!="") {
            date1 = moment().format("YYYY-MM-DD  HH:mm:ss");
            alert(date1);
            if(date1.getTime()>date2.getTime()){
                $("#lefTime").val("");
                $("#rightTime").val("");
                alert("输参数有误")
            }
        }else{

            if(date1.getTime()>date2.getTime()){
                $("#lefTime").val("");
                $("#rightTime").val("");
                alert("输参数有误")
            }
        }

    }
}
function gonghuo1() {
    var lefTime = $("#lefTime1").val();
    var rightTime = $("#rightTime1").val();
    var date1 = new Date(lefTime);
    var date2 = new Date(rightTime);
    if (date1!=""&&date2!="") {
        if (date1==""&&date2!="") {
            date1 = moment().format("YYYY-MM-DD  HH:mm:ss");
            alert(date1);
            if(date1.getTime()>date2.getTime()){
                $("#lefTime").val("");
                $("#rightTime").val("");
                alert("输参数有误")
            }
        }else{

            if(date1.getTime()>date2.getTime()){
                $("#lefTime").val("");
                $("#rightTime").val("");
                alert("输参数有误")
            }
        }

    }
}
